home *** CD-ROM | disk | FTP | other *** search
- Path: ix.netcom.com!news
- From: Bradd W. Szonye <bradds@ix.netcom.com>
- Newsgroups: comp.lang.c++
- Subject: RE: merge sort
- Date: 19 Apr 1996 09:40:27 GMT
- Organization: Netcom
- Message-ID: <01bb2dd4.885af680$c6c2b7c7@Zany.localhost>
- References: <4jpqpg$lhj@dub-news-svc-6.compuserve.com> <4jsae3$1a3@bilbo.nask.org.pl> <4juf4c$5gl@news.microsoft.com>
- NNTP-Posting-Host: det-mi6-06.ix.netcom.com
- X-NETCOM-Date: Fri Apr 19 4:40:27 AM CDT 1996
- X-Newsreader: Microsoft Internet News
-
-
- On Wednesday, April 03, 1996, Dann Corbit wrote...
- > In article <4jsae3$1a3@bilbo.nask.org.pl>, flssoft@blue.maloka.waw.pl
- says...
- > >
- > >Philippe Verdy <100105.3120@compuserve.com> wrote:
- > >
- > >>PC Lab User <lab-mail@cs.utas.edu.au> s'Θcrit :
- > >>> has anyone got some source for the "merge" algorithm used in
- mergesort?
- > >>> thanx
- > >>>
- > >>> m_wookey@postoffice.utas.edu.au
- > >>This sort algorithm is of the same general idea as the QuickSort:
- > >>Divide and conquer. It is dividing a segment to sort, into two
- > >>subsegments to sort.
- > >[cut]
- > >
- > >But note that Marge Sort has O(n) memory cost. Quick Sort has O(1).
- > The simplest version of Merge Sort needs n extra pointers. For
- > an array of records, this is typically a small fraction of the
- > actual memory supply needed for the data. There are some recent
- > papers that show an optimal merge sort can run with O(sqrt(n))
- > extra pointers.
- > --
- > The opinions expressed in this message are my own personal views
- > and do not reflect the official views of Microsoft Corporation.
- > In fact, I'm just a subcontractor, not an employee, so pull in your
- claws.
- >
- >
- Yes, but Mergesort is much better than Quicksort for external sorts
- (disk-based sorts) since its memory accesses are less random.
-
-
-